<template>
  <div>
    <navbar title="影像上传" :disabled="true"></navbar>
    <div style="position:relative;top:46px;">
      <form :action="action" method="post" enctype="multipart/form-data">
        <div>
          <input type="text" name="billType" value="Idcard" style="display:none;">
          <input type="file" name="file" id="Idcard">
        </div>
        <div>
          <input type="text" name="billType" value="Idcard" style="display:none;">
          <input type="file" name="file" id="Idcard2">
        </div>
        <div>
          <input type="text" name="billType" value="checkCarPic" style="display:none;">
          <input type="file" name="file" id="checkCarPic">
        </div>
        <button type="submit" value="Submit">提交</button>
      </form>
    </div>
  </div>
</template>

<script>
import navbar from "../components/navbar.vue";

export default {
  components: { navbar },
  data() {
    return {
      action: "",
      baseInfo: window.localStorage.getItem("baseInfo"),
       baseInfoDto: window.localStorage.getItem("baseInfoDto")
    };
  },
  mounted() {
    console.log(this.action);
    (this.baseInfo = JSON.parse(this.baseInfo)), console.log(this.baseInfo);
    this.baseInfoDto = JSON.parse(this.baseInfoDto)
    console.log( this.baseInfoDto)
    var proposalno = this.baseInfoDto.businessApplyNo !=''? this.baseInfoDto.businessApplyNo:this.baseInfoDto.trafficApplyNo
    console.log(proposalno)
    this.action =
      process.env.API_ROOT +
      "ebusiness/intefPropertyInsuranceServlet?actionType=imageUpload" +
      "&userCode=" +
      this.baseInfo.userCode +
      "&userPassword=" +
      'tsbx009@!qw09kkbve@@!001'+
      "&proposalno=" +
      proposalno;
  },
  methods: {
    onRead(file) {
      console.log(file);
    }
  }
};
</script>
<style scoped lang="scss">
</style>
